var i;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var EventManager = require("AA_EventManager");
var ResKeeper = require("AA_ResKeeper");
var EvenType = require("AA_EvenType");
var PlayerDataManager = require("AA_PlayerDataManager");
var GameDataManager = require("AA_GameDataManager");
var _decorator = cc._decorator;
var _ccclass = _decorator.ccclass;
_decorator.property;

var _def_Module_News_RedPoint = function (e) {
  function _creator() {
    return null !== e && e.apply(this, arguments) || this;
  }
  __extends(_creator, e);
  _creator.prototype.onEnable = function () {
    EventManager.EventMgr.addEventListener(EvenType.EVENT_TYPE.GAME_TIAOZHAN_COUNT, this.onUpdateUi, this);
    EventManager.EventMgr.addEventListener(EvenType.EVENT_TYPE.Game_PASS, this.onUpdateUi, this);
    this.onUpdateUi();
  };
  _creator.prototype.onDisable = function () {
    EventManager.EventMgr.rmEventListener(EvenType.EVENT_TYPE.GAME_TIAOZHAN_COUNT, this.onUpdateUi, this);
    EventManager.EventMgr.rmEventListener(EvenType.EVENT_TYPE.Game_PASS, this.onUpdateUi, this);
  };
  _creator.prototype.onUpdateUi = function () {
    if (GameDataManager.GameDataMgr.getNowMaxLevel() >= 4) {
      var e = PlayerDataManager.PlayerDataMgr.getWuJinCount();
      this.node.children[0].active = e > 0;
    } else {
      this.node.children[0].active = false;
    }
  };
  return __decorate([_ccclass], _creator);
}(ResKeeper.default);
exports.default = _def_Module_News_RedPoint;